package org.example.constroller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class Thymeleaf {

    @GetMapping("/obj/{param}")
    @ResponseBody
    public String handleRequest(@PathVariable String param) {
        double floatValue = Double.parseDouble(param);
        int result = (int) Math.ceil(floatValue); // 返回大于或等于该浮点数的最小整数
        return "<span>" + result + "</span>";
    }
}
